package practice3;

public class Point2D {
	float x = 0.0f;
	float y = 0.0f;
	
	public Point2D(){
		
	}
	
    public Point2D(float x, float y){
		this.x = x;
		this.y = y;
	}
    
    public float getX(){
    	return x;
    }
    
    public float getY(){
    	return y;
    }
    
    public float[] getXY(){
    	float[] XY = new float[2];
    	XY[0] = x;
    	XY[1] = y;
    	return XY;
    }
    
    public void setX(float x){
    	this.x = x;
    }
    
    public void setY(float y){
    	this.y = y;
    }
    
    public void setXY(float x, float y){
    	this.x = x;
    	this.y = y;
    }
    
    public String toString(){
    	return "( " + x + " , " + y + " )";
    }

}
